package edu.sfsu.powerrangers.jeopardy.editor;

import java.io.File;
import javax.swing.SwingUtilities;
import javax.swing.UIDefaults;
import javax.swing.UIManager;

public class EditorApplication {
	public static void main(final String[] args) {
		try {
			System.setProperty("com.apple.mrj.application.apple.menu.about.name", "WTQ Editor");
			System.setProperty("apple.laf.useScreenMenuBar", "true");
			System.setProperty("apple.awt.use-file-dialog-packages", "false");
		} catch (Exception e) {}
		
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (Exception e) {}
		
		UIDefaults defaults = UIManager.getDefaults();
		defaults.put("TabbedPane.useSmallLayout", Boolean.TRUE);
		
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				if (args.length > 0) {
					for (String arg : args) {
						new EditorFrame(new File(arg)).setVisible(true);
					}
				} else {
					new EditorFrame().setVisible(true);
				}
			}
		});
	}
}
